package com.dingding.nettyserver.core.util;

import org.apache.log4j.Logger;

/**
 * @Description 日志工具类
 * @author fengshuonan
 * @date 2016年11月29日 下午5:47:30
 */
public class LogKit {
	
	private static Logger log = Logger.getLogger(LogKit.class);

	public static void debug(String message) {
		LogKit.log.debug(message);
	}

	public static void debug(String message, Throwable t) {
		LogKit.log.debug(message, t);
	}

	public static void info(String message) {
		LogKit.log.info(message);
	}
	
	public static void info(String message, Throwable t) {
		LogKit.log.info(message, t);
	}

	public static void warn(String message) {
		LogKit.log.warn(message);
	}

	public static void warn(String message, Throwable t) {
		LogKit.log.warn(message, t);
	}

	public static void error(String message) {
		LogKit.log.error(message);
	}

	public static void error(String message, Throwable t) {
		LogKit.log.error(message, t);
	}
	
	public static void reportBegin(String ip) {
		LogKit.log.info("------------------------------------- "  + "接收到客户端新消息,IP:" + ip + " --------------------------");
	}
	
	public static void reportEnd(String ip){
		LogKit.log.info("------------------------------------- "  + "END IP:" + ip + " -------------------------------------");
	}

}
